Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idle_deployment - Scale down deployments to put EDA into an idle state: #272

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

aknochow
Copy link
Member

@aknochow aknochow commented Feb 3, 2025

Added idle_deployment feature
Set redis replicas maximum to 1 (aligns with galaxy operator)
Added replicas: 1 to postgresql statefulset to ensure a single replica (needed to wake from idle)

Patch EDA to put into idle state:
oc patch eda eda --type=merge -p '{"spec":{"idle_deployment":true}}'

Result:

NAME                                                          READY   STATUS    RESTARTS   AGE
pod/eda-server-operator-controller-manager-5b4b58bdd7-dzfrs   2/2     Running   0          2m19s

NAME                                                     READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/eda-activation-worker                    0/0     0            0           18h
deployment.apps/eda-api                                  0/0     0            0           18h
deployment.apps/eda-default-worker                       0/0     0            0           18h
deployment.apps/eda-event-stream                         0/0     0            0           18h
deployment.apps/eda-redis                                0/0     0            0           18h
deployment.apps/eda-scheduler                            0/0     0            0           18h
deployment.apps/eda-server-operator-controller-manager   1/1     1            1           18h
deployment.apps/eda-ui                                   0/0     0            0           18h

NAME                                                                DESIRED   CURRENT   READY   AGE
replicaset.apps/eda-activation-worker-bccb8bd64                     0         0         0       18h
replicaset.apps/eda-api-7787696874                                  0         0         0       18h
replicaset.apps/eda-default-worker-5875f8d446                       0         0         0       18h
replicaset.apps/eda-event-stream-785dc54b8f                         0         0         0       18h
replicaset.apps/eda-redis-747596546f                                0         0         0       18h
replicaset.apps/eda-scheduler-cbfc48dd9                             0         0         0       18h
replicaset.apps/eda-server-operator-controller-manager-5b4b58bdd7   1         1         1       2m19s
replicaset.apps/eda-ui-88c5b59cf                                    0         0         0       18h

NAME                               READY   AGE
statefulset.apps/eda-postgres-15   0/0     18h

Patch EDA again to bring out of idle state:
oc patch eda eda --type=merge -p '{"spec":{"idle_deployment":false}}'

Result:

NAME                                                          READY   STATUS    RESTARTS   AGE
pod/eda-activation-worker-bccb8bd64-8mg8c                     1/1     Running   0          3m31s
pod/eda-activation-worker-bccb8bd64-jzh5m                     1/1     Running   0          3m31s
pod/eda-activation-worker-bccb8bd64-pjzkh                     1/1     Running   0          3m31s
pod/eda-api-7787696874-zqhwc                                  3/3     Running   0          3m33s
pod/eda-default-worker-5875f8d446-7s6kd                       1/1     Running   0          3m32s
pod/eda-default-worker-5875f8d446-kv47x                       1/1     Running   0          3m32s
pod/eda-event-stream-785dc54b8f-r9ztd                         2/2     Running   0          3m28s
pod/eda-postgres-15-0                                         1/1     Running   0          4m8s
pod/eda-redis-747596546f-6gfdf                                1/1     Running   0          4m13s
pod/eda-scheduler-cbfc48dd9-jls78                             1/1     Running   0          3m30s
pod/eda-scheduler-cbfc48dd9-klwj7                             1/1     Running   0          3m30s
pod/eda-server-operator-controller-manager-5b4b58bdd7-dzfrs   2/2     Running   0          7m54s
pod/eda-ui-88c5b59cf-2p9nm                                    1/1     Running   0          3m26s

NAME                                                     READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/eda-activation-worker                    3/3     3            3           18h
deployment.apps/eda-api                                  1/1     1            1           18h
deployment.apps/eda-default-worker                       2/2     2            2           18h
deployment.apps/eda-event-stream                         1/1     1            1           18h
deployment.apps/eda-redis                                1/1     1            1           18h
deployment.apps/eda-scheduler                            2/2     2            2           18h
deployment.apps/eda-server-operator-controller-manager   1/1     1            1           19h
deployment.apps/eda-ui                                   1/1     1            1           18h

NAME                                                                DESIRED   CURRENT   READY   AGE
replicaset.apps/eda-activation-worker-bccb8bd64                     3         3         3       18h
replicaset.apps/eda-api-7787696874                                  1         1         1       18h
replicaset.apps/eda-default-worker-5875f8d446                       2         2         2       18h
replicaset.apps/eda-event-stream-785dc54b8f                         1         1         1       18h
replicaset.apps/eda-redis-747596546f                                1         1         1       18h
replicaset.apps/eda-scheduler-cbfc48dd9                             2         2         2       18h
replicaset.apps/eda-server-operator-controller-manager-5b4b58bdd7   1         1         1       7m54s
replicaset.apps/eda-ui-88c5b59cf                                    1         1         1       18h

NAME                               READY   AGE
statefulset.apps/eda-postgres-15   1/1     18h

@aknochow aknochow self-assigned this Feb 3, 2025
@aknochow aknochow requested a review from dsavineau February 3, 2025 21:09
@aknochow aknochow force-pushed the idle_deployment branch 3 times, most recently from 6f8b4ec to 1e560da Compare February 6, 2025 21:56
@aknochow aknochow requested a review from dsavineau February 6, 2025 21:57
@aknochow aknochow force-pushed the idle_deployment branch 3 times, most recently from d37e57a to add236e Compare February 6, 2025 22:54
@aknochow aknochow changed the title adding idle_deployment idle_deployment - Scale down deployments to put EDA into an idle state: Feb 6, 2025
@aknochow aknochow marked this pull request as draft February 6, 2025 23:09
adding idle_deployment to scale down deployments
Copy link

sonarqubecloud bot commented Feb 7, 2025

@aknochow aknochow marked this pull request as ready for review February 7, 2025 17:18
@aknochow aknochow merged commit 90ef6c5 into ansible:main Feb 11, 2025
6 checks passed
@aknochow aknochow deleted the idle_deployment branch February 11, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants